<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="/css/bootstrap.min.css">
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css">
	<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
	<script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>
	<script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
	<title>Document</title>
	<style>
		aside {
			background-color: #2e3f50;
			width: 15%;
			height: 100vh;
			float: left;
			color: #fff;
			padding: 30px;
			display: flex;
			flex-direction: column;
			justify-content: start;
			align-items: center;
		}

		header {
			width: 85%;
			background-color: #5268b7;
			color: #fff;
			height: 70px;
			float: right;
			border-radius: 2px;
		}

		.name {
			margin: 10px 0;
			line-height: 60px;
		}

		aside a {
			color: #fff;
		}
		aside a:hover {
			color: #999;
			text-shadow: 3px 3px 5px #000;
		}
		aside a.active {
			color: #999;
			text-shadow: 3px 3px 5px #000;
		}

		main {
			width: 85%;
			float: right;
		}

		.add {
			margin-top: 50px;
			padding: 20px;
			width: 70%;
		}
	</style>
</head>
<body>

	<aside class="shadow">
		<p class="h3">smbms</p>
		<p class="name"><span th:text="${session.username}">李明</span></p>
		<nav class="nav flex-column">
			<a class="nav-link" href="/home">
				<i class="bi bi-house-door-fill"></i>
				<span>首页</span>
			</a>
			<a class="nav-link active" href="#">
				<i class="bi bi-people-fill"></i>
				<span>用户管理</span>
			</a>
			<a class="nav-link" href="/showBill">
				<i class="bi bi-receipt-cutoff"></i>
				<span>账单管理</span>
			</a>
			<a class="nav-link" href="/showProvider">
				<i class="bi bi-cart-fill"></i>
				<span>供应商管理</span>
			</a>
			<a class="nav-link" href="/editPasswordHTML">
				<i class="bi bi-gear-fill"></i>
				<span>个人设置</span>
			</a>
			<a class="nav-link" href="/quit">
				<i class="bi bi-box-arrow-left"></i>
				<span>退出</span>
			</a>
		</nav>
	</aside>

	<header class="navbar shadow">
		<h3>超市账单管理系统</h3>
	</header>

	<main>
		<nav aria-label="breadcrumb">
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><a href="./home.html">Home</a></li>
				<li class="breadcrumb-item"><a href="./userList.html">用户管理</a></li>
				<li class="breadcrumb-item active" aria-current="page">修改用户</li>
			</ol>
		</nav>

		<div class="container shadow add">
			<form action="/EditUser">
				<div class="form-group row">
<!--					<label for="id" class="col-sm-2 col-form-label">用户工号</label>-->
					<div class="col-sm-10">
						<input th:value="${user.id}" type="text" name="id" class="form-control" id="id" hidden="hidden">
					</div>
				</div>
				<!-- 用户名 -->
				<div class="form-group row">
					<label for="username" class="col-sm-2 col-form-label">用户名称</label>
					<div class="col-sm-10">
						<input th:value="${user.username}" type="text" name="username" class="form-control" id="username" required>
					</div>
				</div>
				<!-- 密码 -->
				<div class="form-group row">
					<label for="userpassword" class="col-sm-2 col-form-label">用户密码</label>
					<div class="col-sm-10">
						<input th:value="${user.userpassword}" type="password" name="userpassword" class="form-control" id="userpassword" required>
					</div>
				</div>
				<!-- 用户性别 -->
				<fieldset class="form-group row">
					<legend class="col-form-label col-sm-2 float-sm-left pt-0">用户性别</legend>
					<div class="col-sm-10">
						<div class="form-check">
							<input class="form-check-input" type="radio" name="gender" id="gendertype1" value="1" checked>
							<label class="form-check-label" for="gendertype1">
								男
							</label>
						</div>
						<div class="form-check">
							<input class="form-check-input" type="radio" name="gender" id="gendertype2" value="2">
							<label class="form-check-label" for="gendertype2">
								女
							</label>
						</div>
					</div>
				</fieldset>
				<!-- 出生日期 -->
				<div class="form-group row">
					<label for="birthday" class="col-sm-2 col-form-label">出生日期</label>
					<div class="col-sm-10">
						<input th:value="${user.birthday}" type="date" name="birthday" class="form-control" id="birthday" required>
					</div>
				</div>
				<!-- 用户电话 -->
				<div class="form-group row">
					<label for="phone" class="col-sm-2 col-form-label">用户电话</label>
					<div class="col-sm-10">
						<input th:value="${user.phone}" type="tel" name="phone" class="form-control" id="phone" required>
					</div>
				</div>
				<!-- 用户地址 -->
				<div class="form-group row">
					<label for="address" class="col-sm-2 col-form-label">用户地址</label>
					<div class="col-sm-10">
						<input th:value="${user.address}" type="text" name="address" class="form-control" id="address" required>
					</div>
				</div>
				<!-- 用户类别 -->
				<fieldset class="form-group row">
					<legend class="col-form-label col-sm-2 float-sm-left pt-0">用户类别</legend>
					<div class="col-sm-10">
						<div class="form-check">
							<input class="form-check-input" type="radio" name="userrole" id="role1" value="1" checked>
							<label class="form-check-label" for="role1">
								管理员
							</label>
						</div>
						<div class="form-check">
							<input class="form-check-input" type="radio" name="userrole" id="role2" value="2">
							<label class="form-check-label" for="role2">
								经理
							</label>
						</div>
						<div class="form-check">
							<input class="form-check-input" type="radio" name="userrole" id="role3" value="3">
							<label class="form-check-label" for="role3">
								普通用户
							</label>
						</div>
					</div>
				</fieldset>
				<!-- 注册按钮 -->
				<div class="form-group row">
					<div class="col-sm-10"></div>
					<div class="col-sm-2">
						<input type="submit" class="btn btn-primary" value="保存">
					</div>
				</div>
			</form>
		</div>

	</main>

</body>
	<script>

	</script>
</html>